Chapter 1
Chapter 2
String is not included


- Random (java.util) ---> generate random values
discrete
nextInt(upper) ---> 0 (inclusive) through upper - 1 (inclusive)
nextInt()
---> generates random integer values between Integer.MIN_VALUE (smallest int value)
and Integer.MAX_VALUE (largest int value)/ 

Challenge: use nextInt() to generate a random int between 1 (inclusive) and 6 (inclusive)

(Math.abs(rnd.nextInt()) % 6 + 1) 


Hint: 
Math.abs(a) % b ---> 0 (inclusive) and b - 1 (inclusive)

Continuous
nextFloat() ---> random floating point value between 0.0 (inclusive) and 1.0 (exclusive)

Challenge: use nextFloat to generate a random int value between 1 (inclusive) and 6 (inclusive)

Random rnd = new Random();

rnd.nextFloat() [0.0; 1.0[ ---> rnd.nextFloat() * 6 [0.0; 6.0[ ---> rnd.nextFloat()*6 + 1 [1.0; 6.0[

(int) (rnd.nextFloat() * 6 + 1) ---> {1, 2, 3, ..., 6}

- java.lang.Math
If the method is static, you can use it through the class name
Math.abs

Math.pow(4, 2) ---> 16.0
Math.pow(4, 0.5) ---> 2.0
Math.pow(4, 1/2) ---> Math.pow(4, 0) ---> 1.0

Math.sqrt(16) ---> 4.0

int a = 4, b = 3, c = 5;

int max = Math.max(a, b); // max = 4
max = Math.max(max, c); // max = 5

max = Math.max(c, Math.max(a, b));

Math.cos, Math.sin ----> angles are assumed to be measured in radians

Math.floor(4.5) // 4.0
Math.ceil(4.5) // 5.0

Math.random() ---> [0.0; 1.0[

Problem#1:
ax^2 + bx + c
We need to read a, b, and c from the user

Then evaluate the quadratic formula to find the roots.

delta = b^2 - 4ac
root1 = -b + sqrt(delta) / (2a)
root2 = -b - sqrt(delta) / (2a)


Problem#2:
Input: name
Output: a new name made up of 3 characters randomly selected from the input name

Problem#3:
Ask the user for first, father, last name

last name first name father name





































